package com.team6.cet.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import com.team6.cet.entity.Admin;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Options;
 
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AdminDao {

/**
根据id删除Admin
*/
 //@Delete("delete from admin where id = #{id,jdbcType=INTEGER}")
    int delById(Integer id);
/**

根据新增Admin，id自增
*/
	@Options(useGeneratedKeys = true, keyProperty = "id")
    int save(Admin record);
    
/**
根据id查询Admin
*/   
 
    Admin getById(Integer id);

/**
根据id更新Admin
*/ 
    int editById(Admin record);

/**
查询所有Admin
*/    
    List<Admin> list();
 /**
分页查询查询所有Admin
*/    
   List<Admin> pagelist(@Param("pageNum") int pageNum,@Param("pageSize") int pageSize);
   Admin getByname(@Param("name")String name);
   Admin getnamepassword(@Param("name")String name,@Param("password")String password);
     
}